# -*- coding : utf_8 -*-
'''
=======================================
Time : 2025/4/1 18:18
Author : 田霄汉
Email : 522989570@qq.com
File : request_util.py
Project : unittest_demo
=======================================
'''

import requests
import json

class RequestsUtil:

    session = requests.session()

    @classmethod
    def send_request(cls, method, url, **kwargs):

        try:
            method = str(method).lower()
            res = cls.session.request(method=method, url=url, **kwargs)
            return res.text
        except Exception as e:
            print(f"报错信息：{e}")